Advanced Moan Programming |
Using 'F'or Loops |
Accessing Channel Registers From Outside the Moan Program |
You can read/write registers for a moan channel with the Set Channel Register and Channel Register commands. This is useful to allow you to alter the behaviour of moan programs on the fly. Using Labels and Jumps |
Moan programs can also make use of labels and goto statements (which are called Jump statements in moan). As with commands, labels are composed of a single UPPER case letter. This limits each program to having a maximum of 26 labels. A label is defined as such: Wind (Again) |
The previous wind example in the Simple Moan Tutorial used a Move command to move all the sprites to the right. The problem with this command was that they would only move 10000 pixels, then they would stop. What you really need is a program that loops so that the wind will never stop, here it is: Using If Statements |
Moan programs can also make use of very simple If/Then statements. An If statement in moan can only have a Jump statement as its body, so all moan If statements take the form: "If condition, Jump label". Conclusion |
|
Table of contents |